import request from "@/utils/request";

export default {
  // 根据日期查询日记
  getDiaryByDate(diary) {
    return request({
      url: `/diary/getDiary`,
      method: "get",
      params: {
        userId: diary.userId,
        createTime: diary.createTime,
      },
    });
  },
  // 添加或更新日记
  addDiary(diary) {
    return request({
      url: "/diary/addDiary",
      method: "post",
      data: diary,
    });
  },
};
